package cn.wolfcode.wolf2w.web.controller;

import cn.wolfcode.wolf2w.annotation.RequireLogin;
import cn.wolfcode.wolf2w.annotation.UserParam;
import cn.wolfcode.wolf2w.domain.UserInfo;
import cn.wolfcode.wolf2w.service.IVisitService;
import cn.wolfcode.wolf2w.uitl.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("visit")
public class VisitController {
    @Autowired
    private IVisitService visitService;
    @GetMapping("/get")
    @RequireLogin
    public Object visitMap(String id, @UserParam UserInfo userInfo){
        return JsonResult.success( visitService.getMap(id,userInfo.getId()));
    }


}
